package cn.practice.chat.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.function.Consumer;

/**
 * @ClassName Listener
 * @Description:
 * @Author A-TAO
 * @Date 2022/11/8
 * @Version V1.0
 **/
@Component
@Slf4j
public class Listener {

    @Bean
    public Consumer<String> testtopic(){
        return message ->{
          log.info("接收消息为：{}", message);
        };
    }



    @Bean
    public Consumer<String> sms(){
        return message ->{
            log.info("接收消息为：{}", message);
        };
    }
}
